package main
 
import (
	"fmt"
	"time"
)

func main()  {
	c := make(chan int)

	go func()  {
		defer fmt.Println("child end")

		fmt.Println("child is running")

		c <- 666
	}()
	
	time.Sleep(1 * time.Second)
	num := <- c

	fmt.Println("num =", num)
	fmt.Println("main end")
}